
    <script>
      var myDataRef = new Firebase('https://luntankong.firebaseIO.com/');
	  var queueid = "ub";
	  var someonequeue = myDataRef.child(queueid);
     
      someonequeue.on('child_added', function(snapshot) {
		var message = snapshot.val();
        console.log(message);
		posttoub(message);
		snapshot.ref().remove();
		//myDataRef.child(uid).remove();
		console.log("removed");
      });
	  
	  function posttoub(jsonobj){
		$.post("/hezi/ub",
		  { jsonstr: JSON.stringify(jsonobj)
		  },
		  function(returndata){
			  console.log("back:" + returndata);
		});
	   }

    </script>


